package comgame.components;

import com.almasb.fxgl.entity.component.Component;

public class MoneyComponent extends Component
{
    private int amount=0;

    public MoneyComponent(int amount)
    {
        this.amount = amount;
    }
    public int getAmount()
    {
        return amount;
    }
    public void setAmount(int amount)
    {
        this.amount = amount;
    }
    public void addMoney(int delta) {
        this.amount += delta;
    }
    public void deductMoney(int delta) {this.amount -= delta;}
}
